package com.spark.lola.logistics.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spark.lola.logistics.constant.LogisticsConstant;
import com.spark.lola.support.mybatis.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * @author: Zhi-peng wang
 * @date: 2020/05/06 10:18
 * 货运支出单详情
 **/
@Getter
@Setter
@ApiModel(value = "ExpensesDetail", description = "货运支出单详情")
@TableName("logistics_expenses_detail")
public class ExpensesDetail extends BaseModel {

    @ApiModelProperty(name = "expensesId", value = "支出费用信息id")
    private Long expensesId;

    @ApiModelProperty(name = "drivingType", value = "行驶类型（0-往，1-反，2-往返）")
    private Integer drivingType = LogisticsConstant.ExpensesDrivingType.TO;

    @ApiModelProperty(name = "categoryId", value = "详情类型")
    private Long categoryId;

    @ApiModelProperty(name = "title", value = "名称", notes = "当详情类型为其他时，需自定义填写")
    private String title;

    @ApiModelProperty(name = "price", value = "费用")
    private BigDecimal price = new BigDecimal(0);

    @ApiModelProperty(name = "evidence", value = "凭据")
    private String evidence;

    @ApiModelProperty(name = "isOther", value = "是否是其他")
    @TableField(exist = false)
    private Boolean isOther;

}
